package com.dai.configApply7007.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestConfig {
    @Value("${spring.profiles}")
    private String config;
    @Value("${spring.application.name}")
    private String name;

    @RequestMapping("/getConfig")
    public Object getConfig(){
        return "现在的环境是："+config+"  现在的应用名字是："+name;
    }
}
